home *** CD-ROM | disk | FTP | other *** search
- Path: news.ccs.queensu.ca!news
- From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
- Subject: Re: C++ with Zapp vs. Delphi
- Date: Mon, 22 Jan 1996 12:56:47 GMT
- Organization: Queen's University, Kingston
- Message-ID: <31038877.2364473@130.15.126.54>
- References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com> <4dksp1$3d6c@tigger.cc.uic.edu> <30fe666e.3349285@130.15.126.54> <4durk2$2r54@tigger.cc.uic.edu>
- NNTP-Posting-Host: free1-slip211.tele.queensu.ca
- X-Newsreader: Forte Agent .99c/16.141
-
- olczyk@sunphy1 (Constantin Rasinariu) wrote:
-
- >Duncan Murdoch (dmurdoch@mast.queensu.ca) wrote:
-
- >: There's not a big difference, but I think this is a little bit
- >: preferable. It makes it clear that it's up to the list to know about
- >: sorting, not up to the object. That way you can easily put the same
- >: object in multiple lists with different sorting rules.
- >Try
- >class A:SortedObject (CompareTo not overridden)
- >class B: A ( override with first comparison )
- >class C: A (override second comparison )
-
- This won't work. Each object will still have some class, be it B or
- C. It'll end up sorted on one comparison or the other. What I want
- is to have two lists (say AlphaList and NumericList) and put
- references to the same object in both lists. The first would end up
- sorted alphabetically, the second numerically.
-
-
- >OK. Try this one.
- >You have a class, call it model which contains data and a list
- >of objects that derive from a 'view' class. Each 'view' class must
- >derive from a component. Each view class must received new data as it is
- >modified in model. Model must recieve data from the view class as it
- >is changed in the view.
- >How do you implement this?
-
- I'm sorry, but I'm not sure what you're asking. Can you state the
- problem in more generic terms, without assuming your solution?
- Remember, I'm reading this in the Delphi group, and I'm not
- particularly familiar with C++ jargon.
-
- Duncan
-